package com.springframework.DI_t.list_DI;

import com.springframework.DI_t.list_DI.bean.ClassA;
import com.springframework.DI_t.list_DI.bean.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ListDIRun {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("com.springframework/DI_t/list_DI/bean.xml");
        ClassA classA = context.getBean("classA",ClassA.class);
        System.out.println(classA.getClassName());
        for(Student student : classA.getStudents()){
            System.out.println(student);
        }
        System.out.println(classA.toString());
    }
}
